<?php

namespace App\Modules\Admin\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class AdminRoleUser
 * *
 * @property $id
 * @property $admin_uid
 * @property $role_uid
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 *
 * @package App\Models
 * @mixin \Illuminate\Database\Eloquent\Builder
 */
class AdminRoleUser extends Model
{
    use SoftDeletes;

    protected $table = 'admin_role_user';

    protected $fillable = ['admin_uid', 'role_uid'];

    protected $visible = ['admin_uid', 'role_uid'];

    public function adminRole()
    {
        return $this->belongsTo(AdminRole::class, 'role_uid', 'role_uid');
    }

}
